package com.dhcc.bpm.modules.scf.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dhcc.bpm.modules.scf.dto.ScfInvoiceInfoDTO;
import com.dhcc.bpm.modules.scf.entity.ScfInvoiceInfo;
import com.dhcc.bpm.modules.scf.vo.ScfInvoiceInfoVO.ScfGetInvoiceDetailsVO;
import com.dhcc.bpm.modules.scf.vo.ScfInvoiceInfoVO.ScfGetInvoiceListVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * 发票信息表 服务类
 *
 * @author liuguoting
 * @since 2023-09-25
 */
public interface IScfInvoiceInfoService extends IService<ScfInvoiceInfo> {

    /**
     * 自定义分页
     *
     * @param page
     * @param scfInvoiceInfo
     * @return
     */
    IPage<ScfGetInvoiceListVO> selectScfInvoiceInfoPage(IPage<ScfGetInvoiceListVO> page, ScfInvoiceInfoDTO scfInvoiceInfo);

    /**
     * 查看发票详细信息
     *
     * @param scfInvoiceInfo
     * @return
     */
    ScfGetInvoiceDetailsVO details(ScfInvoiceInfoDTO scfInvoiceInfo);

    /**
     * 新增发票信息
     *
     * @param scfInvoiceInfo
     * @return
     */
    Boolean saveInvoiceInfo(ScfInvoiceInfoDTO scfInvoiceInfo) throws Exception;

    /**
     * 导入发票信息
     *
     * @param scfInvoiceInfos
     * @return
     */
    int bachSaveInvoiceInfo(List<ScfInvoiceInfo> scfInvoiceInfos, String operatorId);

    /**
     * 修改发票信息
     *
     * @param scfInvoiceInfo
     * @return
     */
    Boolean updateInvoiceInfo(ScfInvoiceInfoDTO scfInvoiceInfo);


    /**
     * 批量导入
     *
     * @param operatorId
     * @param file
     * @return
     * @throws IOException
     */
    List<ScfInvoiceInfo> batchSaveScfInvoiceInfo(String operatorId, MultipartFile file) throws IOException;

    Boolean deleteByIds(String[] split);
}
